package com.jianganming.observer.gper;

public class Test {
    public static void main(String[] args) {
        Teacher tome = new Teacher("Tome");

        Teacher jerry = new Teacher("Jerry");

        GPer gper = GPer.getInstance();
        gper.addObserver(tome);
        gper.addObserver(jerry);

        Question question = new Question();
        question.setUserName("张三");
        question.setContent("观察者模式适用于哪些场景？");

        gper.publishQuestion(question);

    }
}
